package org.hugoduncan.appam.component;

import java.util.ArrayList;
import java.util.Collection;

import org.hugoduncan.appam.model.CollectionComponent;
import org.hugoduncan.appam.model.WorkspaceComponent;

public class BasicWorkspace
    implements WorkspaceComponent
{
    private Collection<CollectionComponent> otherCollections=
        new ArrayList<CollectionComponent>();
    private CollectionComponent defaultCollection;

    public Collection<CollectionComponent> getOtherCollections() {
        return otherCollections;
    }

    public void setOtherCollections(Collection<CollectionComponent> collections)
    {
        this.otherCollections = collections;
    }

    public CollectionComponent getDefaultCollection() {
        return defaultCollection;
    }

    public void setDefaultCollection(CollectionComponent defaultCollection) {
        this.defaultCollection = defaultCollection;
    }

    public void add(CollectionComponent cc) {
        if (defaultCollection==null)
            defaultCollection=cc;
        else
            otherCollections.add(cc);
    }

}
